package pl.krzosekm.vehicleregister.service;

import org.springframework.beans.factory.annotation.Autowired;

import pl.krzosekm.vehicleregister.dao.VehicleDAO;
import pl.krzosekm.vehicleregister.model.Vehicle;

public class VehicleServiceImpl extends BaseService implements VehicleService {

    @Autowired
    VehicleDAO vehicleDAO;
    
    public void save(Vehicle vehicle) {
	vehicleDAO.save(vehicle);
    }
    
    public Vehicle getVehicleByVin(String vin) {
	Vehicle vehicle = vehicleDAO.getVehicleByVin(vin);
	return vehicle;
    }

    public VehicleDAO getVehicleDAO() {
        return vehicleDAO;
    }

    public void setVehicleDAO(VehicleDAO vehicleDAO) {
        this.vehicleDAO = vehicleDAO;
    }

    

}
